#include <stdio.h>

// namespace name{
//     //variables, functions, classes
// }

// 将类定义在命名空间中
namespace SUMU1 {
    class student {
      public:
        const char *name;
        int         age;
        float       score;

      public:
        void say()
        {
            printf("[SUMU1] %s的年龄是 %d, 成绩是 %f\n", name, age, score);
        }
    };
} // namespace SUMU1

// 将类定义在命名空间中
namespace SUMU2 {
    class student {
      public:
        const char *name;
        int         age;
        float       score;

      public:
        void say()
        {
            printf("[SUMU2] %s age is %d, score is %f\n", name, age, score);
        }
    };
} // namespace SUMU2

int main()
{
    // 指定使用SUMU1命名空间
    SUMU1::student stu1;
    stu1.name = "stu1";
    stu1.age = 15;
    stu1.score = 92.5f;
    stu1.say();
    // 指定使用SUMU2命名空间
    SUMU2::student stu2;
    stu2.name = "stu2";
    stu2.age = 15;
    stu2.score = 92.5f;
    stu2.say();

    using namespace SUMU2;
    student stu3;
    stu3.name = "stu3";
    stu3.age = 15;
    stu3.score = 92.5f;
    stu3.say();

    return 0;
}
